## Script (Python) "getPublicatorItemInfo"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=object=None
##title=Customizado do CMFPublicator para retornar outras informações além do DublinCore
##
item_metadata = {}
mtool = context.portal_membership

if object is not None:
    try:
        item_metadata['Group'] = object.aq_parent.title_or_id()
    except:
        item_metadata['Group'] = ''
    try:
        creator = object.Creator()
        author = mtool.getMemberInfo(creator)
        item_metadata['AuthorName'] = author and author['fullname'] or creator
    except:
        item_metadata['AuthorName'] = ''
else:
    item_metadata['Group'] = ''
    item_metadata['AuthorName'] = ''

return item_metadata
